From: Tim Lunn Date: Sat, 1 Sep 2012 02:21:34 +0000 (+1000) Subject: statusArea: hide power indicator on desktop X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5993 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=87e021cd2ec1594f5d6a347c7e27ba928d8b1a32;p=gnome-shell.git statusArea: hide power indicator on desktop On a desktop system the power indicator does not get hidden correctly, since a blank icon '' is returned instead of null. https://bugzilla.gnome.org/show_bug.cgi?id=683080 --- diff --git a/js/ui/status/power.js b/js/ui/status/power.js index ea7654956..1669734a2 100644 --- a/js/ui/status/power.js +++ b/js/ui/status/power.js @@ -152,11 +152,12 @@ const Indicator = new Lang.Class({ _syncIcon: function() { let icon = this._proxy.Icon; - let hasIcon = (icon != null); + let hasIcon = false; - if (hasIcon) { + if (icon) { let gicon = Gio.icon_new_for_string(icon); this.setGIcon(gicon); + hasIcon = true; } this.mainIcon.visible = hasIcon; this.actor.visible = hasIcon && !this._isLocked;